import { BroadCastCall } from "../../broadCast/BroadCastCall";
import { MessageBlock } from "../../../../../Framework/MQ/MessageBlock";
import { SCrossCopyCostNotice } from "../../../../../Message/Public/SCrossCopyCostNotice";
import { NetDispatcher } from "../../../../mvc/core/NetDispatcher";
import { ServerCommand } from "../../../mvc/ServerCommand";
import { Alert } from "../../../../../com/mui/controls/Alert";
import { GameProxy } from "../../../mvc/GameProxy";
type int = number;
//class CrossCopyCostNoticeCommand
    
    export  class CrossCopyCostNoticeCommand extends BroadCastCall
    {
        constructor(arg1: Object)
        {
            super(arg1);
            return;
        }

        public /* override */ call(arg1: MessageBlock): void
        {
            super.call(arg1);
            var loc1=arg1.messageBase as SCrossCopyCostNotice;
            NetDispatcher.dispatchCmd(ServerCommand.CrossCopy_CostNoticeEnter, loc1);
            return;
        }

        /* internal  */onEnterCopyAlertHandler(arg1: int, arg2: SCrossCopyCostNotice): void
        {
            if (arg1 != Alert.OK) 
            {
                GameProxy.copy.replyCrossCopyCost(arg2.copyCode, false);
            }
            else 
            {
                GameProxy.copy.replyCrossCopyCost(arg2.copyCode, true);
            }
            return;
        }
    }
